﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage/Common.master" CodeFile="ProceedOrder.aspx.cs" Inherits="Page_Products_ProceedOrder" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register Assembly="webapp4U" TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <table border="0" width="100px" cellpadding="0"  cellspacing="0" align="center">
                <tr>
                    <td style="padding-top:5pt;" align="center">
                        <asp:GridView runat="server" Width="500px" HorizontalAlign="Center" 
                            ID="GridViewItem" 
                            AutoGenerateColumns="False" 
                            AllowPaging="True" 
                            AllowSorting="False" 
                            PagerSettings-Mode="NumericFirstLast"
                            GridLines="None" 
                            EnableModelValidation="True" PageSize="20">
                            <Columns>                              
                                                        
                                <asp:TemplateField HeaderText="Image" 
                                    HeaderStyle-Width="60" ItemStyle-Width="60"
                                    HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center">
                                    <HeaderTemplate><%=ResourceManager.GetString("Image") %></HeaderTemplate>
                                    <ItemTemplate>
                                        <table>
                                            <tr>
                                                <td align="center" width="41px" height="41px" style="border:solid 1px #cccccc; cursor:pointer">
                                                     <img border="0" src='<%=Globals.ApplicationPath %>Page/Products/Image.ashx?Size=S&ImageUrl=<%# webapp4U.BOL.Products.GetImageUrlByID((string)Eval("ItemKey"))%>' />   
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="60px" />
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                                </asp:TemplateField>
                    
                                <asp:TemplateField HeaderText="Sản phẩm" 
                                    HeaderStyle-Width="200" ItemStyle-Width="200" ItemStyle-Height="40"
                                    HeaderStyle-HorizontalAlign="Left"
                                    ItemStyle-HorizontalAlign ="left">
                                    <HeaderTemplate><%=ResourceManager.GetString("Product_TenSanPham")%></HeaderTemplate>
                                    <ItemTemplate>
                                        <%# Eval("Description") %>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="200px" />
                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
                                </asp:TemplateField>
                    
                                <asp:TemplateField HeaderText="Giá bán(VNĐ)" 
                                    HeaderStyle-Width="100" ItemStyle-Width="100"
                                    HeaderStyle-HorizontalAlign="Left"
                                    ItemStyle-HorizontalAlign ="left">
                                    <HeaderTemplate><%=ResourceManager.GetString("Product_Price")%></HeaderTemplate>
                                    <ItemTemplate>
                                          <span style="font-weight:normal"><%# (Double)Eval("UnitPrice")%> VNĐ</span>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>
                    
                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px" HeaderStyle-Width="100px"
                                    HeaderText="Delete">
                                    <HeaderTemplate><%=ResourceManager.GetString("Product_Quantity")%></HeaderTemplate>
                                    <ItemTemplate>                                        
                                        <span style="font-weight:normal"><%#Eval("Quantity") %></span>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                    
                                <asp:TemplateField HeaderText="Thành Tiền(VNĐ)" 
                                    HeaderStyle-Width="100" ItemStyle-Width="100"
                                    HeaderStyle-HorizontalAlign="Left"
                                    ItemStyle-HorizontalAlign ="left">
                                    <HeaderTemplate><%=ResourceManager.GetString("Product_UnitSubTotal")%></HeaderTemplate>
                                    <ItemTemplate>
                                          <span style="font-weight:normal"><%# (Double)Eval("Subtotal")%> VNĐ</span>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>

                            </Columns>
                            <EmptyDataTemplate>
                                <table align="center" width="100%" border="0" bgcolor="#ffffcc" bordercolorlight="#0099cc"  bordercolor="#0099cc">
                                    <tr>
                                        <td height="50" align="center">
                                            <div align="center" id="EmptyData"><%=ResourceManager.GetString("Product_ShoppingCartEmpty")%></div>
                                        </td>   
                                    </tr>
                                </table>
                            </EmptyDataTemplate>
                            <PagerSettings Mode="NumericFirstLast" />
                        </asp:GridView>            
                    </td>
                </tr>
                <tr>
                    <td align="right"> 
                        <asp:Panel runat="server" ID="PanelUpdate">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="right" class="ProductPrice" style="padding-top:8px;">
                                        <%=ResourceManager.GetString("Product_Subtotal")%>: <%=GetTotalShoppingCart()%>  &nbsp; VNĐ
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="padding-top:8px;">
                                    <br />
                                    <webapp4U:Button runat="server" ID="btDelete" Text=" Delete " ResourceName="Product_Delete" OnClick="btDelete_Click" />
                                    &nbsp;&nbsp;
                                    <webapp4U:Button runat="server" ID="btKeepOrder" Text="Keep Order" ResourceName="Product_KeepOrder" OnClick="btKeepOrder_Click"  /></td>                           
                                </tr>
                    
                                <tr>
                                    <td align="right" style="padding-top:25px;">
                                        <asp:HyperLink CssClass="ProceedOrder" runat="server" ID="linkProceedOrder" NavigateUrl="~/Page/Products/ProceedOrder.aspx"><%=ResourceManager.GetString("Product_ProceedOrder")%></asp:HyperLink>
                                        &nbsp;&nbsp;
                                        <webapp4U:Button class="ProceedOrder" runat="server" ID="btn_ContinueShopping" Text=" Tiếp tục mua hàng " ResourceName="Product_ContinueShopping"  />                             
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
                </table> 

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
